import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
data = pd.read_csv("C:/Users/priya/Documents/GitHub/OIBSIP/Task-2_unemployment/Unemployment in India.csv")
print(data.head())
States Date Frequency EUR EE ELPR Area Region 0 Andhra Pradesh 31-05-2019 Monthly 3.65 11999139 43.24 Rural South 1 Andhra Pradesh 30-06-2019 Monthly 3.05 11755881 42.05 Rural South 2 Andhra Pradesh 31-07-2019 Monthly 3.75 12086707 43.50 Rural South 3 Andhra Pradesh 31-08-2019 Monthly 3.32 12285693 43.97 Rural South 4 Andhra Pradesh 30-09-2019 Monthly 5.17 12256762 44.68 Rural South
print(data.isnull().sum())
States 0 Date 0 Frequency 0 EUR 0 EE 0 ELPR 0 Area 0 Region 0 dtype: int64
data.columns= ["States","Date","Frequency","EUR","EE","ELPR","Area","Region"]
plt.style.use('seaborn-whitegrid')
plt.figure(figsize=(12, 10))
sns.heatmap(data.corr())
plt.show()
# Set the column names for your data
data.columns = ["States", "Date", "Frequency", "EUR", "EE", "ELPR", "Area","Region"]
# Set the figure size and create a new subplot
fig, ax = plt.subplots(figsize=(15, 12))
# Set the title of the plot
plt.title("Indian Unemployment")
# Create the histogram plot using Seaborn
sns.histplot(x="EE", hue="States", data=data, ax=ax)
# Display the plot
plt.show()
plt.figure(figsize=(12, 10))
plt.title("Indian Unemployment")
sns.histplot(x="EUR", hue="States", data=data)
plt.show()
unemploment = data[["States", "Region", "EUR"]]
figure = px.sunburst(unemploment, path=["States","Region"],
values="EUR",
width=700, height=700, color_continuous_scale="RdYlGn",
title="Unemployment Rate in India")
figure.show()